#include <REGX52.H>
#include "Delay.h"
#include "MatrixLED.h"

unsigned char Animation[]={
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x5E,0x52,0x5E,0x41,0x7F,0x40,0x00,0x3E,
	0x22,0x22,0x22,0x3E,0x00,0x00,0x5E,0x52,
	0x52,0x5E,0x41,0x7F,0x40,0x00,0x00,0x79,
	0x8A,0x89,0xBF,0x88,0x82,0x01,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};

void main()
{
	unsigned char i,Offset=0,Count=0;
	MatrixLED_Init();
	while(1)
	{
		for(i=0;i<8;i++)	//循环8次，显示8列数据
		{
			MatrixLED_ShowColumn(i,Animation[i+Offset]);
		}
		Count++;			//计次延时
		if(Count>15)
		{
			Count=0;
			Offset++;		//偏移+8，切换下一帧画面
			if(Offset>32)
			{
				Offset=0;
			}
		}
	}
}

